$(document).ready(function() {	
	
	//start_topnav();	
	if ($("#menu").length > 0){
		ddsmoothmenu.init({
			mainmenuid: "menu", //menu DIV id
			orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
			classname: 'ddsmoothmenu', //class added to menu's outer DIV
			//customtheme: ["#1c5a80", "#18374a"],
			contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
		});
	}	
	//----------------------------- END MENU ---------------------------------
	/*
	if ($("#slider").length>0){
		$("#slider").easySlider({
			auto: true,
			continuous: true,
			controlsShow : false
		});
	}
	//----------------------------- END SLIDE ---------------------------------
	$('a.facebox').facebox({
        loadingImage : nvcms_url+'/themes/itm/js/facebox/loading.gif',
        closeImage   : nvcms_url+'/themes/itm/js/facebox/closelabel.png'
	});
	*/
	//----------------------------- END FACEBOX ---------------------------------
	$('.input').focus(function() {
		$('.input').removeClass("input_focus");
		$(this).addClass("input_focus");
	});	
	
	//Tu dong luu lai ho so sau 2phut
	/*if($('#floatpanel').length > 0){	
		var $floatingbox = $('#floatpanel');	
		var bodyY = parseInt($('#floatpanel').offset().top) - 20;
		var originalX = $floatingbox.css('margin-left');	
		$(window).scroll(function () { 		  
			var scrollY = $(window).scrollTop();
			var isfixed = $floatingbox.css('position') == 'fixed';			
			if($floatingbox.length > 0){			
				if ( scrollY > bodyY && !isfixed ) {
					$floatingbox.stop().css({
						position: 'fixed',
						right: 5,
						top: 20,
						marginLeft: originalX
	
					});
				} else if ( scrollY <= bodyY && isfixed ) {
					$floatingbox.css({
						position: 'absolute',
						right: 5,
						top: 220,
						marginLeft: originalX
					});
				}
				
			}
	
		});
		start_autosave_resume();		
	}*/
	//End #floatpanel
});

//Tu dong luu lai ho so sau 2 phut
/*function start_autosave_resume(){
	setTimeout("autosave_resume()", 120000);	
}*/
//End Tu dong luu lai ho so
